Fork me on GitHub

Git SSH��Կ����

Coding.net����

�˻� SSH ��Կ

�˻� SSH ��Կ�Ǹ��û��˻������Ĺ�Կ��һ�����ã�SSH ��ӵ���˻���������Ŀ�ֿ��Ķ�дȨ�ޡ� ���á��˻� SSH ��Կ���ǿ�����ʹ�� SSH ��ʽ����/�޸Ĵ����ֿ��ġ�ǰ�ù���������Ϊ����ȡ SSH Э����ַ���������ɹ�Կ�������� Coding.net ���ӹ�Կ���������衣

��ȡ SSH Э����ַ

����Ŀ�Ĵ���ҳ������ SSH �л��� SSH Э�飬 ���� clone ��ַ������git@git.coding.net:wzw/leave-a-message.git�� ��ʹ��������ַ���������Ĵ����ֿ⡣

���ɹ�Կ

Mac/Linux �����������ն�, Windows ���� Git Bash �� ����ssh-keygen -t rsa -C "username@example.com",( ע��������)������������enter�����ɣ�Ҳ�����������룩��

1
2
3
4
5
6
7
8
9
10
$ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
# Creates a new ssh key, using the provided email as a label
# Generating public/private rsa key pair.
Enter file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter] // �Ƽ�ʹ��Ĭ�ϵ�ַ,����ʹ�÷�Ĭ�ϵ�ַ������Ҫ���� .ssh/config
�ɹ�֮��
Your identification has been saved in /Users/you/.ssh/id_rsa.
# Your public key has been saved in /Users/you/.ssh/id_rsa.pub.
# The key fingerprint is:
# 01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db your_email@example.com

�� Coding.net ���ӹ�Կ

���ش��� id_rsa.pub �ļ�����ִ�� $cat id_rsa.pub ������������ȫ�����ݣ����ӵ��˻���SSH ��Կ��ҳ�� �У���Կ���ƿ������������֡�
���ɺ����������ӡ���Ȼ��������������̬�뼴���������ɡ�

���ɺ��������в��ԣ��״ν������ӻ�Ҫ����������

1
2
3
$ ssh -T git@git.coding.net // ע�� git.coding.net ���뵽 CDN �����Ի�����������ͬ�� host ip The authenticity of host ��git.coding.net (61.146.73.68)�� can not be established. RSA key fingerprint is 98:ab:2b:30:60:00:82:86:bb:85:db:87:22:c4:4f:b1. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added ��git.coding.net,61.146.73.68�� (RSA) to the list of kn own hosts.
Enter passphrase for key ��/c/Users/Yuankai/.ssh/id_rsa��: Coding.net Tips : [ Hello Kyle_lyk! You have connected to Coding.net by SSH successfully! ]

�������Ϳ�����git�����ֿ��ˣ���ʹ��SourceTree�dz�����

------------- The endThanks for reading-------------